package com.hp.erp.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PageController {

    @GetMapping("favicon.ico")
    @ResponseBody
    void noFaviconIco() {
        //处理没有favicon.ico的问题
    }

    @RequestMapping("{page}")
    public String page(@PathVariable String page){
        return page;
    }

    @RequestMapping("{path}/{page}")
    public String page(@PathVariable String path,@PathVariable String page){
        return path + "/" + page;
    }
}
